package cn.lichenes.service;

import cn.lichenes.entity.Phone;
import cn.lichenes.entity.PhonePicture;
import org.springframework.data.domain.Page;

import java.util.List;
import java.util.Map;

public interface PhoneService {
    //后台查询手机
    Map<String, Object> findAll(Integer page, String keyword);
    //修改手机信息
    boolean updatePhone(Integer id, double price, Integer residue, String description, String status);
    //上架手机
    boolean save(Phone phone, String brand, List<PhonePicture> pictures);
    //前台查询手机
    Map<String, Object> getAll();
    //前台根据品牌和价格查询手机
    Page<Phone> getPhoneByPrice(String brand, Double price, Integer page);
    //前台查看单一商品
    Map<String, Object> getPhoneById(Integer id);
    //图标
    List<Map<String, Object>> getEcharts();
    //更新数量
    void alipay(Phone phone);
}
